<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
  <th:block th:include="include :: header('修改sys_meet_room')" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
  <form class="form-horizontal m" id="form-meetroom-edit" th:object="${sysMeetroom}">
    <h4 class="form-header h4">sys_meet_room信息</h4>
    <input name="id" th:field="*{id}" type="hidden">
    <div class="form-group">
      <label class="col-sm-3 control-label">会议室名称：</label>
      <div class="col-sm-8">
        <input name="name" th:field="*{name}" class="form-control" type="text">
      </div>
    </div>
    <div class="form-group">
      <label class="col-sm-3 control-label">创建人：</label>
      <div class="col-sm-8">
        <input name="createName" class="form-control" th:value="${user.userId}" type="hidden">
        <span th:text="${user.userName}"></span>
      </div>
    </div>
    <div class="form-group">
      <label class="col-sm-3 control-label">创建时间：</label>
      <div class="col-sm-8">
        <input name="createTime" th:field="*{creTime}" class="form-control" type="text">
      </div>
    </div>
    <div class="form-group">
      <label class="col-sm-3 control-label">地址：</label>
      <div class="col-sm-8">
        <input name="local" th:field="*{local}" class="form-control" type="text">
      </div>
    </div>
    <div class="form-group">
      <label class="col-sm-3 control-label">可容纳人数：</label>
      <div class="col-sm-8">
        <input name="people" th:field="*{people}" class="form-control" type="text">
      </div>
    </div>
    <div class="form-group">
      <label class="col-sm-3 control-label">面积：</label>
      <div class="col-sm-8">
        <input name="area" th:field="*{area}" class="form-control" type="text">
      </div>
    </div>
    <div class="form-group">
      <label class="col-sm-3 control-label">投影：</label>
      <div class="col-sm-8">
        <!--                    <input name="tou" th:field="*{tou}" class="form-control" type="text">-->
        <select name="tou" class="form-control">
          <option th:value="*{tou}" th:field="*{tou}"><span th:text="*{tou}"></span></option>
          <option value="是">是</option>
          <option value="否">否</option>
        </select>

      </div>
    </div>
    <div class="form-group">
      <label class="col-sm-3 control-label">备注：</label>
      <div class="col-sm-8">
        <textarea name="text" class="form-control">[[*{text}]]</textarea>
      </div>
    </div>
    <div class="form-group">
      <label class="col-sm-3 control-label">状态：</label>
      <div class="col-sm-8">
        <!--                    <input name="state" th:field="*{state}" class="form-control" type="text">-->
        <select name="state"  class="form-control">
          <option th:value="*{state}" th:field="*{state}"><span th:text="*{state}"></span></option>
          <option value="可用">可用</option>
          <option value="维护">维护</option>
        </select>
      </div>
    </div>

    <div class="form-group">
      <label class="col-sm-3 control-label">类型：</label>
      <div class="col-sm-8">
        <!--                    <input name="state" th:field="*{state}" class="form-control" type="text">-->
        <select name="type"  class="form-control">
          <option th:value="*{type}" th:field="*{type}"><span th:text="*{type}"></span></option>
          <option value="普通">普通</option>
          <option value="高级">高级</option>
        </select>
      </div>
    </div>
  </form>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
  var prefix = ctx + "system/meetroom";
  $("#form-meetroom-edit").validate({
    focusCleanup: true
  });

  /*function submitHandler() {
    if ($.validate.form()) {
      $.operate.save(prefix + "/edit", $('#form-meetroom-edit').serialize());
    }
  }
  */


  $(function() {
    $('input').attr("disabled", "disabled");
    $('select').attr("disabled", "disabled");
    $('textarea').attr("disabled", "disabled");


    var options = {
      data: [[${sysMeetroom.sysWzxUserList}]],
      pagination: false,
      showSearch: false,
      showRefresh: false,
      showToggle: false,
      showColumns: false,
      sidePagination: "client",
      columns: [{
        checkbox: true
      },
        {
          field: 'index',
          align: 'center',
          title: "序号",
          formatter: function (value, row, index) {
            var columnIndex = $.common.sprintf("<input type='hidden' name='index' value='%s'>", $.table.serialNumber(index));
            return columnIndex + $.table.serialNumber(index);
          }
        },
        {
          field: 'deptId',
          align: 'center',
          title: '部门ID',
          formatter: function(value, row, index) {
            var html = $.common.sprintf("<input class='form-control' type='text' name='sysWzxUserList[%s].deptId' value='%s'>", index, value);
            return html;
          }
        },

        {
          field: 'loginName',
          align: 'center',
          title: '登录账号',
          formatter: function(value, row, index) {
            var html = $.common.sprintf("<input class='form-control' type='text' name='sysWzxUserList[%s].loginName' value='%s'>", index, value);
            return html;
          }
        },

        {
          field: 'userName',
          align: 'center',
          title: '人员姓名',
          formatter: function(value, row, index) {
            var html = $.common.sprintf("<input class='form-control' type='text' name='sysWzxUserList[%s].userName' value='%s'>", index, value);
            return html;
          }
        },

        {
          field: 'userType',
          align: 'center',
          title: '用户类型',
          formatter: function(value, row, index) {
            var html = $.common.sprintf("<input class='form-control' type='text' name='sysWzxUserList[%s].userType' value='%s'>", index, value);
            return html;
          }
        },

        {
          field: 'email',
          align: 'center',
          title: '用户邮箱',
          formatter: function(value, row, index) {
            var html = $.common.sprintf("<input class='form-control' type='text' name='sysWzxUserList[%s].email' value='%s'>", index, value);
            return html;
          }
        },

        {
          field: 'phonenumber',
          align: 'center',
          title: '手机号码',
          formatter: function(value, row, index) {
            var html = $.common.sprintf("<input class='form-control' type='text' name='sysWzxUserList[%s].phonenumber' value='%s'>", index, value);
            return html;
          }
        },

        {
          field: 'sex',
          align: 'center',
          title: '用户性别',
          formatter: function(value, row, index) {
            var html = $.common.sprintf("<input class='form-control' type='text' name='sysWzxUserList[%s].sex' value='%s'>", index, value);
            return html;
          }
        },

        {
          field: 'avatar',
          align: 'center',
          title: '头像路径',
          formatter: function(value, row, index) {
            var html = $.common.sprintf("<input class='form-control' type='text' name='sysWzxUserList[%s].avatar' value='%s'>", index, value);
            return html;
          }
        },

        {
          field: 'password',
          align: 'center',
          title: '密码',
          formatter: function(value, row, index) {
            var html = $.common.sprintf("<input class='form-control' type='text' name='sysWzxUserList[%s].password' value='%s'>", index, value);
            return html;
          }
        },

        {
          field: 'salt',
          align: 'center',
          title: '盐加密',
          formatter: function(value, row, index) {
            var html = $.common.sprintf("<input class='form-control' type='text' name='sysWzxUserList[%s].salt' value='%s'>", index, value);
            return html;
          }
        },

        {
          field: 'status',
          align: 'center',
          title: '帐号状态',
          formatter: function(value, row, index) {
            var html = $.common.sprintf("<input class='form-control' type='text' name='sysWzxUserList[%s].status' value='%s'>", index, value);
            return html;
          }
        },

        {
          field: 'delFlag',
          align: 'center',
          title: '删除标志',
          formatter: function(value, row, index) {
            var html = $.common.sprintf("<input class='form-control' type='text' name='sysWzxUserList[%s].delFlag' value='%s'>", index, value);
            return html;
          }
        },

        {
          field: 'loginIp',
          align: 'center',
          title: '最后登录IP',
          formatter: function(value, row, index) {
            var html = $.common.sprintf("<input class='form-control' type='text' name='sysWzxUserList[%s].loginIp' value='%s'>", index, value);
            return html;
          }
        },

        {
          field: 'loginDate',
          align: 'center',
          title: '最后登录时间',
          formatter: function(value, row, index) {
            var html = $.common.sprintf("<input class='form-control' type='text' name='sysWzxUserList[%s].loginDate' value='%s'>", index, value);
            return html;
          }
        },

        {
          field: 'pwdUpdateDate',
          align: 'center',
          title: '密码最后更新时间',
          formatter: function(value, row, index) {
            var html = $.common.sprintf("<input class='form-control' type='text' name='sysWzxUserList[%s].pwdUpdateDate' value='%s'>", index, value);
            return html;
          }
        },

        {
          field: 'createBy',
          align: 'center',
          title: '创建者',
          formatter: function(value, row, index) {
            var html = $.common.sprintf("<input class='form-control' type='text' name='sysWzxUserList[%s].createBy' value='%s'>", index, value);
            return html;
          }
        },

        {
          field: 'createTime',
          align: 'center',
          title: '创建时间',
          formatter: function(value, row, index) {
            var html = $.common.sprintf("<input class='form-control' type='text' name='sysWzxUserList[%s].createTime' value='%s'>", index, value);
            return html;
          }
        },

        {
          field: 'updateBy',
          align: 'center',
          title: '更新者',
          formatter: function(value, row, index) {
            var html = $.common.sprintf("<input class='form-control' type='text' name='sysWzxUserList[%s].updateBy' value='%s'>", index, value);
            return html;
          }
        },

        {
          field: 'updateTime',
          align: 'center',
          title: '更新时间',
          formatter: function(value, row, index) {
            var html = $.common.sprintf("<input class='form-control' type='text' name='sysWzxUserList[%s].updateTime' value='%s'>", index, value);
            return html;
          }
        },

        {
          field: 'endTime',
          align: 'center',
          title: '结束时间',
          formatter: function(value, row, index) {
            var html = $.common.sprintf("<input class='form-control' type='text' name='sysWzxUserList[%s].endTime' value='%s'>", index, value);
            return html;
          }
        },

        {
          field: 'remark',
          align: 'center',
          title: '备注',
          formatter: function(value, row, index) {
            var html = $.common.sprintf("<input class='form-control' type='text' name='sysWzxUserList[%s].remark' value='%s'>", index, value);
            return html;
          }
        },

        {
          field: 'withWork',
          align: 'center',
          title: '协同人',
          formatter: function(value, row, index) {
            var html = $.common.sprintf("<input class='form-control' type='text' name='sysWzxUserList[%s].withWork' value='%s'>", index, value);
            return html;
          }
        },

        {
          field: 'dest',
          align: 'center',
          title: '目的地',
          formatter: function(value, row, index) {
            var html = $.common.sprintf("<input class='form-control' type='text' name='sysWzxUserList[%s].dest' value='%s'>", index, value);
            return html;
          }
        },

        {
          field: 'reason',
          align: 'center',
          title: '原因',
          formatter: function(value, row, index) {
            var html = $.common.sprintf("<input class='form-control' type='text' name='sysWzxUserList[%s].reason' value='%s'>", index, value);
            return html;
          }
        },

        {
          field: 'state',
          align: 'center',
          title: '状态',
          formatter: function(value, row, index) {
            var html = $.common.sprintf("<input class='form-control' type='text' name='sysWzxUserList[%s].state' value='%s'>", index, value);
            return html;
          }
        },

        {
          title: '操作',
          align: 'center',
          formatter: function(value, row, index) {
            var value = $.common.isNotEmpty(row.index) ? row.index : $.table.serialNumber(index);
            return '<a class="btn btn-danger btn-xs" href="javascript:void(0)" onclick="sub.delRowByIndex(\'' + value + '\')"><i class="fa fa-remove"></i>删除</a>';
          }
        }]
    };
    $.table.init(options);
  });

  function addRow() {
    var count = $("#" + table.options.id).bootstrapTable('getData').length;
    var row = {
      index: $.table.serialNumber(count),
      deptId: "",
      loginName: "",
      userName: "",
      userType: "",
      email: "",
      phonenumber: "",
      sex: "",
      avatar: "",
      password: "",
      salt: "",
      status: "",
      delFlag: "",
      loginIp: "",
      loginDate: "",
      pwdUpdateDate: "",
      createBy: "",
      createTime: "",
      updateBy: "",
      updateTime: "",
      endTime: "",
      remark: "",
      withWork: "",
      dest: "",
      reason: "",
      state: "",
    }
    sub.addRow(row);
  }
</script>
</body>
</html>